#ifndef __BUSINESSSERVICE_H__
#define __BUSINESSSERVICE_H__

#include "TCPConnection.hpp"
#include "Message.hpp"

#include <iostream>

using std::cout;
using std::endl;

class Mytask{

public:
    Mytask(const string &msg,cdm::TCPConnectionPtr conn)
    :_msg(msg),
    _conn(conn){
    }

    void process(){
        cout << "Mytask::process is running" << endl;
        //decode
        //compute
        //encode
        string response = _msg;
        _conn->sendInLoop(response);
    }

private:
    string _msg;
    cdm::TCPConnectionPtr   _conn;

};

class UserLoginSection1{

public:
    UserLoginSection1(cdm::TCPConnectionPtr conn,cdm::Packet &packet);
    ~UserLoginSection1(){}
    
    void process();

private:
    cdm::TCPConnectionPtr    _conn;
    cdm::Packet              _packet;

};

class UserLoginSection2{

public:
    UserLoginSection2(cdm::TCPConnectionPtr conn,cdm::Packet &packet);
    ~UserLoginSection2(){}
    
    void process();
    

private:
    cdm::TCPConnectionPtr    _conn;
    cdm::Packet              _packet;

};



#endif


